package com.voice.call.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.voice.call.common.Const;
import com.voice.call.common.Result;
import com.voice.call.version.ApiVersion;


@RestController
//@RequestMapping("/voice")
@RequestMapping("/api/{version}/")
public class VoiceTestController {
	
	//spring-action.xml 中 supportedMediaTypes配置对应于 produces内容
	private final Logger log = LoggerFactory.getLogger(VoiceTestController.class);
	
	@ResponseBody
	@ApiVersion(1)
	@RequestMapping(value = "voice", method = RequestMethod.GET)
	public Result testMethod1(){ 
		
		log.info("get请求 hello world");
		return new Result();
	}
	
	@ResponseBody
	@ApiVersion(1)
	@RequestMapping(value = "call", method = RequestMethod.POST, produces = Const.JSON_UTF8)
	public Result testMethod2(){
		
		log.info("post请求 hello world");
		return new Result();
	}

}
